<%--
  Created by IntelliJ IDEA.
  User: 29795
  Date: 2025/3/25
  Time: 下午11:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <title>User List</title>
</head>
<body>
<h1>User List</h1>
<table border="1">
    <tr>
        <th>ID</th>
        <th>Username</th>
        <th>Password</th>
        <th>Create Time</th>
        <th>Sex</th>
        <th>Age</th>
        <th>Department ID</th>
        <th></th>
    </tr>
    <c:forEach var="user" items="${users}">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td>
                <fmt:formatDate value="${user.createtime}" pattern="yyyy-MM-dd HH:mm:ss" />
            </td>
            <td>${user.info.sex}</td>
            <td>${user.info.age}</td>
            <td>${user.dept.deptname}</td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
